package com.gaohe.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gaohe.mapper.UserCardMapper;
import com.gaohe.pojo.UserCard;
import com.gaohe.service.UserCardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserCardServiceImpl extends ServiceImpl<UserCardMapper,UserCard> implements UserCardService {
    @Autowired
    private UserCardMapper userCardMapper;

    @Override
    public List<UserCard> getCardByUserId(Long id) {
        LambdaQueryWrapper<UserCard>lw = new LambdaQueryWrapper<>();
        lw.eq(UserCard::getUserId,id);
        List<UserCard>list =  userCardMapper.selectList(lw);
        return list;
    }
}
